package day03;

public class IfDemo {
    public static void main(String[] args) {
       /* int m=0,n=3;
        if(m>n){
           System.out.println("大石沟");}
           int a=10,b=12;
           if(a!=b){
               System.out.println("小石沟");
        }
       double score=78;
           if(score>100 || score<0){
              System.out.println("成绩不合法");
           }
           else if(score<60){
               System.out.println("成绩不及格");
           }
           else if(score>=60 && score<70){
             System.out.println("成绩及格");
           }
           else if(score>=70 && score<80){
               System.out.println("成绩良好");
           }
           else if(score>=80 && score<90){
               System.out.println("成绩良好");
           }
           else if(score>=90 && score<=100){
               System.out.println("成绩优秀");
           }
          if(m>n){
              System.out.println("大傻瓜");
          }else{
              System.out.println("小傻瓜");
          }
          if(a!=b){
              System.out.println("360涨");
          }else{
              System.out.println("360跌");
          }
         int price=510;
          if(price>400){
              price*=0.8;
          }else{
             price*=0.9;
          }
          System.out.println(price);
          if(score>100 ||score<0){
              System.out.println(score+"成绩不合法");
          }else{
              System.out.println(score+"成绩合法");
          }
          if(a%2==0){
              System.out.println(a+"是偶数");
          }else{
              System.out.println(a+"是奇数");
          }
          if(n<m){
              System.out.println("傻狗");
          }else{
              System.out.println("不是傻狗");
          }
        double price=12200;
        if(price>5000){
            price*=0.5;
        }else if(price>3000){
         price*=0.8;
        }else if(price>1000){
            price*=0.9;

        }else if(price>500){
            price*=0.99;
        }else{
            price*=1;
        }
        System.out.println(price);

    int a=4,b=12;
    if(a>b){
        System.out.println("最大值为a");
    }else{
        System.out.println("最大值为b");
    }
   int w=22,q=23;
   int c=w>q?w:q;

   int r=12, t=14;
   int max=r>t?r:t;
   System.out.println(max);

  int d=12,f=24;
  int box=d!=f?f:d;
  System.out.println(box);

  int year=2000;
  if(year%4==0 &&year%100==0||year%400==0){
      System.out.println(year+"是闰年");

  }else{
      System.out.println(year+"不是闰年");
  }

  double  score=70.36;
  if(score>100 ||score<0){
      System.out.println("成绩不合法");
  }else if(score>=90){
      System.out.println("成绩优秀");
  }else if(score>80){
      System.out.println("成绩良好");
  }else if(score>+60){
      System.out.println("成绩及格");
  }else{
      System.out.println("成绩不及格");
  }


   int a=12,b=14;
   int max=a>b?a:b;
   System.out.println(max);

   int aa=45,bb=36,bax;
   if(aa>bb){
       max=aa;
   }else{
       max=bb;
   }
  System.out.println(max);

   int num=5;
   int flag=num>0?1:2;
   System.out.println(flag);

   int c=8,d=5;
   int tax=a>b?a:b;
   System.out.println(tax);

   double price=500;
   if(price>500){
       price*=0.8;
   }
   System.out.println(price);
    }*/
   int  score=555;
    if(score<=100 &&score>=0){

        System.out.println("成绩合法");
    }
    double price=5000;
  if(price>=5000){
      price*=0.5;
  }else if(price>=3000){
      price*=0.6;
  }else if(price>=1000){
      price*=0.8;
  }else if(price>=500){
      price*=0.9;
  }else{
      price*=1;
  }
    System.out.println(price);
}
}